<h2>การอนุญาตเข้าใช้ข้อมูล</h2>

<div id="paging" class="pagination">
<?php echo $pagination;?>
</div>
<div id="main-content">
	<table width="100%" cellspacing="0" cellpadding="10" border="0">
		<tr class="ui-state-error">
			<th class="ui-state-error tdlist">ลำดับ</th>
			<th class="ui-state-error tdlist">หัวข้อที่ขออนุญาติ</th>
			<th class="ui-state-error tdlist">ผู้ขออนุญาติ</th>
			<th class="ui-state-error tdlist">วันที่ขออนุญาติ</th>
			<th class="ui-state-error tdlist">ผู้อนุญาติ</th>
			<th class="ui-state-error tdlist">จัดการข้อมูล</th>
		</tr>
		<?php 
		  $rowStyle = '';
		  $page = (isset($_GET['page']))? $_GET['page']:1;
		  $i=(isset($_GET['page']))? (($_GET['page'] -1)* 10)+1:1;
		  foreach($requests as $request):
		?>  
			<tr style="cursor: pointer;" onclick="window.location='admin_approve/form/<?=$request['id']?>'">
			  <td class="tdlist"><?=$i?></td>
			  <td class="tdlist"><?=$request['kntitle']?></td>
			  <td class="tdlist"><?=$request['req_username']?></td>
			  <td class="tdlist"><?=db_to_th($request['created'],false,'y')?></td>	  
			  <td class="tdlist"><?=$request['own_username']?></td>		  
			  <td class="tdlist"><a href="admin_approve/delete/<?=$request['id']?>" style="text-decoration:none;" onclick="return confirm('ยืนยันการลบ')"><input type="button" class="btn_delete"></a></td>
			</tr>
		<? 
			$i++;
	  		endforeach; 
		?>		
	</table>
</div>

